<template>
  <div
    :class="['header-modal-body', bottomBorder?'header-has-border':'']">
    <slot></slot>
  </div>
</template>

<script>
export default {
  name: "EmptyMainHead",
  props: {
    title: {
      type: String,
      required: false,
      default:""
    },
    icon: {
      type: String,
      required: false,
      default: ""
    },
    bottomBorder: {
      type: Boolean,
      default: true,
    }
  },
  computed: {
    titleSlot () {
      return this.$slots.title
    }
  },
}
</script>

<style lang="scss" scoped>
.header-modal-body {
  flex: 0 0 auto;
  background: rgba(253,253,253,.97);
  padding: 0 15px;
  height: 50px;
  line-height: 50px;
  &.header-has-border {
    border-bottom: 1px solid #eee;
  }
  .ant-icon {
    color: #4e8afa;
    font-size: 20px;
    padding: 0 5px;
  }
  .header-title {
    font-size: 16px;
    color: #333;
    display: flex;
    align-items: center;
    .title-name {
      padding: 0 5px;
      overflow: hidden;
      width: 100%;
      display: inline-block;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
  }
}
</style>
